﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AD.Model;
using AD.BLL;

public partial class Manager_User_PageData_index : WebManagerForm
{
    public int UserCount = 0;
    public int TaobaoKeyWordsCount = 0;
    public int PaipaiKeyWordsCount = 0;
    public int GoogleKeyWordsCount = 0;
    public int BaiduKeyWordsCount = 0;
    public int SoguKeyWordsCount = 0;
    public int InstallCount = 0;
    public int DownloadCount = 0;
    public int SumPoints = 0;
    public int SumShopVail = 0;
    public int SumKeyWordsVail = 0;
    public int SumShopWait = 0;
    public int SumKeyWordsWait = 0;
    public ManagerUserMod user = null;
    protected void Page_Load(object sender, EventArgs e)
    {
        //user = Session[UtilHepler.SESSION_NAME] as ManagerUserMod;
        user = UtilHepler.GetMangerClientCookies(Request, Response);
        UserCount = UserBLL.Sum();
        DownloadCount = DownloadLogBLL.Sum();
        InstallCount = InstallLogBLL.Sum();
        BaiduKeyWordsCount = KeyWordsBLL.SumFilter(" SearchEngineType=1 and Status=1 ");
        GoogleKeyWordsCount = KeyWordsBLL.SumFilter(" SearchEngineType=2 and Status=1 ");
        SoguKeyWordsCount = KeyWordsBLL.SumFilter(" SearchEngineType=3 and Status=1 ");
        SumPoints += (GoogleKeyWordsCount + BaiduKeyWordsCount + PaipaiKeyWordsCount) * HttpDataCache.AppSettings.EverydayKeyWordBalancePoint;
        SumKeyWordsVail = KeyWordsBLL.SumFilter(" Status=0 ");
        SumShopVail = NetShopsBLL.SumFilter(" Status=0 ");
        SumKeyWordsWait = KeyWordsBLL.SumFilter(" Status=2 ");
        SumShopWait = NetShopsBLL.SumFilter(" Status=2 ");
        TaobaoKeyWordsCount = NetShopsBLL.SumFilter(" NetShopType=1 and Status=1 ");
        PaipaiKeyWordsCount = NetShopsBLL.SumFilter(" NetShopType=2 and Status=1 ");
        SumPoints += (TaobaoKeyWordsCount + PaipaiKeyWordsCount) * HttpDataCache.AppSettings.EverydayShopBalancePoint;
    }
}